package com.flx.dis.nacos.admin.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.flx.dis.nacos.admin.entity.Employee;
import com.flx.dis.nacos.admin.service.EmployeeService;
import com.flx.dis.nacos.admin.mapper.EmployeeMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.stereotype.Service;

/**
* @author Administrator
* @description 针对表【t_employee】的数据库操作Service实现
* @createDate 2022-05-03 19:01:36
*/
@Slf4j
@Service
@RefreshScope //配置实时更新
public class EmployeeServiceImpl extends ServiceImpl<EmployeeMapper, Employee> implements EmployeeService{

    @Value("${nacos.author:default}")
    public String author;

    @Autowired
    private EmployeeMapper employeeMapper;

    public String getAuthor()throws Exception{
        log.info("from nacos getAuthor = {}",author);
        return author;
    }

}




